package jge;



import java.util.Calendar;


public class Time {
   // Day
   private int day;
   
   // Hour
   private int hour;
   
   // Minutes
   private int mins;
   
   // Seconds
   private int secs;
   
   // MiliSeconds
   private long mili;

   public int getDay() {
       return this.day;
   }
   
   public int getHour() {
       return this.hour;
   }
      
   public int getMins() {
       return this.mins;
   }
         
   public int getSecs() {
       return this.secs;
   }
   
   public int getMili() {
       return (int)this.mili;
   }
   
   public Time() {
       Calendar date = Calendar.getInstance();
       this.day = date.get(date.DAY_OF_WEEK);
       this.hour = date.get(date.HOUR_OF_DAY);
       this.mili = date.get(date.MILLISECOND);
       this.secs = date.get(date.SECOND);
       this.mins = date.get(date.MINUTE);
   }
   
   public void update() {
       Calendar date = Calendar.getInstance();
       this.day = date.get(date.DAY_OF_WEEK);
       this.hour = date.get(date.HOUR_OF_DAY);
       this.mili = date.get(date.MILLISECOND);
       this.secs = date.get(date.SECOND);
       this.mins = date.get(date.MINUTE);
   } 
}